home *** CD-ROM | disk | FTP | other *** search
- Path: newshost.lanl.gov!tanmoy
- From: tanmoy@qcd.lanl.gov (Tanmoy Bhattacharya)
- Newsgroups: comp.arch.arithmetic,comp.lang.c,comp.lang.c++
- Subject: Re: Access carry flag from C
- Date: 23 Feb 1996 17:15:10 GMT
- Organization: Los Alamos National Laboratory
- Message-ID: <TANMOY.96Feb23101510@qcd.lanl.gov>
- References: <Dn1C9z.DGv.0.net@indra.com> <1996Feb1922.17.19.879@koobera.math.uic.edu>
- <31298D20.41C6@bazis.nl> <danpop.824859220@rscernix>
- <312AFACE.41C6@bazis.nl> <TANMOY.96Feb21081640@qcd.lanl.gov>
- <312D8414.167E@bazis.nl>
- NNTP-Posting-Host: qcd.lanl.gov
- Mime-Version: 1.0
- Content-Type: text
- In-reply-to: Franz Korntner's message of Fri, 23 Feb 1996 09:08:36 GMT
-
- <snip>
- FK: Tanmoy Bhattacharya wrote:
- FK: >
- FK: > In article <312AFACE.41C6@bazis.nl> Franz Korntner <fkorntne@bazis.nl>
- FK: > writes:
- FK: > <snip>
- FK: > 32 bit numbers. According to the (X3J11 / ANSI) standard, the constant
- FK: > INT_MAX (and in this case most limits in limits.h) denotes the minimal
- FK: > limit. It is possible that the physical limit is much higher (or lower
- FK: > in the case of negative values). As I am only interested in the physical
- FK: > limit, the value INT_MAX has no meaning. Only the compiler is fully aware
- FK: > of these limits (and not a header file!) and what I really miss in the
- FK: > standard and/or implementation is a inline function 'maxlimitof(int)',
- FK: > analogical to 'sizeof(int)'.
- FK: >
- FK: > Please quote the standard. I find no discussion of this in my copy;
- FK: > and I suspect it is incorrect.
- FK:
- FK: I only have a copy of the Rationale at this moment, and it is also
- mentioned
- FK: on page 17, Environmental limits.
- FK:
- FK: 2.2.4.2.1 Sizes of integral types <limits.h>. Such a large body of C code
- FK: has been developed for the 8-bit byte machines that the integer sizes in
- FK: such environments must be considered normative. The prescribed limits are
- FK: minima; an implementation on a machine with 9-bit bytes can be conforming,
- FK: as can an implementation that defines int to be the same width as long.
- FK: page 17.
-
- I don't understand what you are saying! Have you read the clause?
-
- 5.2.4.2 (your 2.2.4.2):
-
- A conforming implementation shall document all the limits specified in
- this subclause.
-
- 5.2.4.2.1:
-
- The values given below shall be replaced by constant expressions
- ... Their implementation-defined values shall be greater in magnitude
- (absolute value) to those shown, with the same sign.
-
- ...
- --- maximum value for an object of type int
- INT_MAX +32767
-
- Is there any doubt as to what this means? The only interpretation I
- can think of is that INT_MAX is the maximum value of type int, this
- has to be defined by the implementation, the definition is to be a
- constant, and this constant has to exceed 32767.
-
- It states explicitly that INT_MAX is the maximum value of type int
- ... how do you read anything else?
-
- Cheers
- Tanmoy
- --
- tanmoy@qcd.lanl.gov(128.165.23.46) DECNET: BETA::"tanmoy@lanl.gov"(1.218=1242)
- Tanmoy Bhattacharya O:T-8(MS B285)LANL,NM87545 H:#9,3000,Trinity Drive,NM87544
- Others see <gopher://yaleinfo.yale.edu:7700/00/Internet-People/internet-mail>,
- <http://alpha.acast.nova.edu/cgi-bin/inmgq.pl>or<ftp://csd4.csd.uwm.edu/pub/
- internetwork-mail-guide>. -- <http://nqcd.lanl.gov/people/tanmoy/tanmoy.html>
- fax: 1 (505) 665 3003 voice: 1 (505) 665 4733 [ Home: 1 (505) 662 5596 ]
-